package com.info.zhiduoduo.admin.controller;

import com.info.zhiduoduo.admin.model.formbean.company.CompanyApplyHandleFormBean;
import com.info.zhiduoduo.admin.model.formbean.company.CompanyApplyQueryFormBean;
import com.info.zhiduoduo.admin.service.CompanyApplyService;
import com.info.zhiduoduo.common.constants.SmartResult;
import com.info.zhiduoduo.common.formbean.BaseSimpleFormBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author tianyonghong
 * @create 2023/9/14
 */
@Api(tags = "企业申请表")
@RestController
@RequestMapping("/companyApply")
public class CompanyApplyController {

    @Resource
    private CompanyApplyService companyApplyService;

    @ApiOperation("查询企业申请列表")
    @PostMapping("/queryList")
    public SmartResult queryList(@RequestBody BaseSimpleFormBean<CompanyApplyQueryFormBean> formBean) {
        return companyApplyService.queryList(formBean);
    }

    @ApiOperation("企业申请处理")
    @PostMapping("/handle")
    public SmartResult handle(@RequestBody BaseSimpleFormBean<CompanyApplyHandleFormBean> formBean) {
        return companyApplyService.handle(formBean);
    }

}
